<?php

class Story_Model_DbTable_Membership extends Core_Model_DbTable_Membership
{
	protected $_type = 'story';
	
	public function deleteMembership($story_id) {
          $this->delete(array(
              'resource_id  = ?' => $story_id,
          ));
     }
  
  	public function getMembership($user_id) {
        $select = $this->select();
        $select->where("user_id=?", $user_id)
        		->where("active=?", 1);

        return $this->fetchAll($select);
    }
    public function getMembershipStory($resource_id) {
        $select = $this->select();
        $select->where("resource_id=?", $resource_id);

        return $this->fetchRow($select);
    }
}
